Optimal. Leaf size=157 \[ \frac {4 A B (c+d x)}{(b c-a d) g^2 (a+b x)}-\frac {8 B^2 (c+d x)}{(b c-a d) g^2 (a+b x)}+\frac {4 B^2 (c+d x) \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )}{(b c-a d) g^2 (a+b x)}-\frac {(c+d x) \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{(b c-a d) g^2 (a+b x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 157, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.088, Rules used = {2552, 2333,
2332} \begin {gather*} -\frac {(c+d x) \left (B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )+A\right )^2}{g^2 (a+b x) (b c-a d)}+\frac {4 A B (c+d x)}{g^2 (a+b x) (b c-a d)}+\frac {4 B^2 (c+d x) \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )}{g^2 (a+b x) (b c-a d)}-\frac {8 B^2 (c+d x)}{g^2 (a+b x) (b c-a d)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2332
Rule 2333
Rule 2552
Rubi steps
\begin {align*} \int \frac {\left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{(a g+b g x)^2} \, dx &=-\frac {\left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{b g^2 (a+b x)}+\frac {(2 B) \int \frac {2 (b c-a d) \left (-A-B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{g (a+b x)^2 (c+d x)} \, dx}{b g}\\ &=-\frac {\left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{b g^2 (a+b x)}+\frac {(4 B (b c-a d)) \int \frac {-A-B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )}{(a+b x)^2 (c+d x)} \, dx}{b g^2}\\ &=-\frac {\left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{b g^2 (a+b x)}+\frac {(4 B (b c-a d)) \int \left (\frac {b \left (-A-B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{(b c-a d) (a+b x)^2}-\frac {b d \left (-A-B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{(b c-a d)^2 (a+b x)}+\frac {d^2 \left (-A-B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{(b c-a d)^2 (c+d x)}\right ) \, dx}{b g^2}\\ &=-\frac {\left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{b g^2 (a+b x)}+\frac {(4 B) \int \frac {-A-B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )}{(a+b x)^2} \, dx}{g^2}-\frac {(4 B d) \int \frac {-A-B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )}{a+b x} \, dx}{(b c-a d) g^2}+\frac {\left (4 B d^2\right ) \int \frac {-A-B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )}{c+d x} \, dx}{b (b c-a d) g^2}\\ &=\frac {4 B \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{b g^2 (a+b x)}+\frac {4 B d \log (a+b x) \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{b (b c-a d) g^2}-\frac {4 B d \log (c+d x) \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{b (b c-a d) g^2}-\frac {\left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{b g^2 (a+b x)}-\frac {\left (4 B^2\right ) \int \frac {2 (-b c+a d)}{(a+b x)^2 (c+d x)} \, dx}{b g^2}-\frac {\left (4 B^2 d\right ) \int \frac {(a+b x)^2 \left (\frac {2 d e (c+d x)}{(a+b x)^2}-\frac {2 b e (c+d x)^2}{(a+b x)^3}\right ) \log (a+b x)}{e (c+d x)^2} \, dx}{b (b c-a d) g^2}+\frac {\left (4 B^2 d\right ) \int \frac {(a+b x)^2 \left (\frac {2 d e (c+d x)}{(a+b x)^2}-\frac {2 b e (c+d x)^2}{(a+b x)^3}\right ) \log (c+d x)}{e (c+d x)^2} \, dx}{b (b c-a d) g^2}\\ &=\frac {4 B \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{b g^2 (a+b x)}+\frac {4 B d \log (a+b x) \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{b (b c-a d) g^2}-\frac {4 B d \log (c+d x) \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{b (b c-a d) g^2}-\frac {\left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{b g^2 (a+b x)}+\frac {\left (8 B^2 (b c-a d)\right ) \int \frac {1}{(a+b x)^2 (c+d x)} \, dx}{b g^2}-\frac {\left (4 B^2 d\right ) \int \frac {(a+b x)^2 \left (\frac {2 d e (c+d x)}{(a+b x)^2}-\frac {2 b e (c+d x)^2}{(a+b x)^3}\right ) \log (a+b x)}{(c+d x)^2} \, dx}{b (b c-a d) e g^2}+\frac {\left (4 B^2 d\right ) \int \frac {(a+b x)^2 \left (\frac {2 d e (c+d x)}{(a+b x)^2}-\frac {2 b e (c+d x)^2}{(a+b x)^3}\right ) \log (c+d x)}{(c+d x)^2} \, dx}{b (b c-a d) e g^2}\\ &=\frac {4 B \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{b g^2 (a+b x)}+\frac {4 B d \log (a+b x) \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{b (b c-a d) g^2}-\frac {4 B d \log (c+d x) \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{b (b c-a d) g^2}-\frac {\left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{b g^2 (a+b x)}+\frac {\left (8 B^2 (b c-a d)\right ) \int \left (\frac {b}{(b c-a d) (a+b x)^2}-\frac {b d}{(b c-a d)^2 (a+b x)}+\frac {d^2}{(b c-a d)^2 (c+d x)}\right ) \, dx}{b g^2}-\frac {\left (4 B^2 d\right ) \int \left (-\frac {2 b e \log (a+b x)}{a+b x}+\frac {2 d e \log (a+b x)}{c+d x}\right ) \, dx}{b (b c-a d) e g^2}+\frac {\left (4 B^2 d\right ) \int \left (-\frac {2 b e \log (c+d x)}{a+b x}+\frac {2 d e \log (c+d x)}{c+d x}\right ) \, dx}{b (b c-a d) e g^2}\\ &=-\frac {8 B^2}{b g^2 (a+b x)}-\frac {8 B^2 d \log (a+b x)}{b (b c-a d) g^2}+\frac {8 B^2 d \log (c+d x)}{b (b c-a d) g^2}+\frac {4 B \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{b g^2 (a+b x)}+\frac {4 B d \log (a+b x) \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{b (b c-a d) g^2}-\frac {4 B d \log (c+d x) \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{b (b c-a d) g^2}-\frac {\left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{b g^2 (a+b x)}+\frac {\left (8 B^2 d\right ) \int \frac {\log (a+b x)}{a+b x} \, dx}{(b c-a d) g^2}-\frac {\left (8 B^2 d\right ) \int \frac {\log (c+d x)}{a+b x} \, dx}{(b c-a d) g^2}-\frac {\left (8 B^2 d^2\right ) \int \frac {\log (a+b x)}{c+d x} \, dx}{b (b c-a d) g^2}+\frac {\left (8 B^2 d^2\right ) \int \frac {\log (c+d x)}{c+d x} \, dx}{b (b c-a d) g^2}\\ &=-\frac {8 B^2}{b g^2 (a+b x)}-\frac {8 B^2 d \log (a+b x)}{b (b c-a d) g^2}+\frac {8 B^2 d \log (c+d x)}{b (b c-a d) g^2}-\frac {8 B^2 d \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{b (b c-a d) g^2}-\frac {8 B^2 d \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{b (b c-a d) g^2}+\frac {4 B \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{b g^2 (a+b x)}+\frac {4 B d \log (a+b x) \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{b (b c-a d) g^2}-\frac {4 B d \log (c+d x) \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{b (b c-a d) g^2}-\frac {\left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{b g^2 (a+b x)}+\frac {\left (8 B^2 d\right ) \int \frac {\log \left (\frac {b (c+d x)}{b c-a d}\right )}{a+b x} \, dx}{(b c-a d) g^2}+\frac {\left (8 B^2 d\right ) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,a+b x\right )}{b (b c-a d) g^2}+\frac {\left (8 B^2 d\right ) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,c+d x\right )}{b (b c-a d) g^2}+\frac {\left (8 B^2 d^2\right ) \int \frac {\log \left (\frac {d (a+b x)}{-b c+a d}\right )}{c+d x} \, dx}{b (b c-a d) g^2}\\ &=-\frac {8 B^2}{b g^2 (a+b x)}-\frac {8 B^2 d \log (a+b x)}{b (b c-a d) g^2}+\frac {4 B^2 d \log ^2(a+b x)}{b (b c-a d) g^2}+\frac {8 B^2 d \log (c+d x)}{b (b c-a d) g^2}-\frac {8 B^2 d \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{b (b c-a d) g^2}+\frac {4 B^2 d \log ^2(c+d x)}{b (b c-a d) g^2}-\frac {8 B^2 d \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{b (b c-a d) g^2}+\frac {4 B \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{b g^2 (a+b x)}+\frac {4 B d \log (a+b x) \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{b (b c-a d) g^2}-\frac {4 B d \log (c+d x) \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{b (b c-a d) g^2}-\frac {\left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{b g^2 (a+b x)}+\frac {\left (8 B^2 d\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {d x}{b c-a d}\right )}{x} \, dx,x,a+b x\right )}{b (b c-a d) g^2}+\frac {\left (8 B^2 d\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {b x}{-b c+a d}\right )}{x} \, dx,x,c+d x\right )}{b (b c-a d) g^2}\\ &=-\frac {8 B^2}{b g^2 (a+b x)}-\frac {8 B^2 d \log (a+b x)}{b (b c-a d) g^2}+\frac {4 B^2 d \log ^2(a+b x)}{b (b c-a d) g^2}+\frac {8 B^2 d \log (c+d x)}{b (b c-a d) g^2}-\frac {8 B^2 d \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{b (b c-a d) g^2}+\frac {4 B^2 d \log ^2(c+d x)}{b (b c-a d) g^2}-\frac {8 B^2 d \log (a+b x) \log \left (\frac {b (c+d x)}{b c-a d}\right )}{b (b c-a d) g^2}+\frac {4 B \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{b g^2 (a+b x)}+\frac {4 B d \log (a+b x) \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{b (b c-a d) g^2}-\frac {4 B d \log (c+d x) \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{b (b c-a d) g^2}-\frac {\left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{b g^2 (a+b x)}-\frac {8 B^2 d \text {Li}_2\left (-\frac {d (a+b x)}{b c-a d}\right )}{b (b c-a d) g^2}-\frac {8 B^2 d \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )}{b (b c-a d) g^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 4 vs. order 3 in
optimal.
time = 0.32, size = 322, normalized size = 2.05 \begin {gather*} -\frac {\left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2+\frac {4 B \left (2 B (b c-a d+d (a+b x) \log (a+b x)-d (a+b x) \log (c+d x))-(b c-a d) \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )-d (a+b x) \log (a+b x) \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )+d (a+b x) \log (c+d x) \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )-B d (a+b x) \left (\log (a+b x) \left (\log (a+b x)-2 \log \left (\frac {b (c+d x)}{b c-a d}\right )\right )-2 \text {Li}_2\left (\frac {d (a+b x)}{-b c+a d}\right )\right )+B d (a+b x) \left (\left (2 \log \left (\frac {d (a+b x)}{-b c+a d}\right )-\log (c+d x)\right ) \log (c+d x)+2 \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )\right )\right )}{b c-a d}}{b g^2 (a+b x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(430\) vs.
\(2(157)=314\).
time = 0.42, size = 431, normalized size = 2.75
method | result | size |
norman | \(\frac {\frac {\left (A^{2}-4 A B +8 B^{2}\right ) x}{g a}+\frac {B^{2} c \ln \left (\frac {e \left (d x +c \right )^{2}}{\left (b x +a \right )^{2}}\right )^{2}}{g \left (a d -c b \right )}+\frac {B^{2} d x \ln \left (\frac {e \left (d x +c \right )^{2}}{\left (b x +a \right )^{2}}\right )^{2}}{g \left (a d -c b \right )}+\frac {2 \left (A -2 B \right ) c B \ln \left (\frac {e \left (d x +c \right )^{2}}{\left (b x +a \right )^{2}}\right )}{g \left (a d -c b \right )}+\frac {2 d \left (A -2 B \right ) B x \ln \left (\frac {e \left (d x +c \right )^{2}}{\left (b x +a \right )^{2}}\right )}{g \left (a d -c b \right )}}{g \left (b x +a \right )}\) | \(188\) |
risch | \(-\frac {A^{2}}{g^{2} \left (b x +a \right ) b}+\frac {\frac {8 B^{2} x}{a g}+\frac {B^{2} c \ln \left (\frac {e \left (d x +c \right )^{2}}{\left (b x +a \right )^{2}}\right )^{2}}{g \left (a d -c b \right )}+\frac {B^{2} d x \ln \left (\frac {e \left (d x +c \right )^{2}}{\left (b x +a \right )^{2}}\right )^{2}}{g \left (a d -c b \right )}-\frac {4 B^{2} c \ln \left (\frac {e \left (d x +c \right )^{2}}{\left (b x +a \right )^{2}}\right )}{g \left (a d -c b \right )}-\frac {4 B^{2} d x \ln \left (\frac {e \left (d x +c \right )^{2}}{\left (b x +a \right )^{2}}\right )}{g \left (a d -c b \right )}}{g \left (b x +a \right )}-\frac {2 A B \ln \left (\frac {e \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )^{2}}{b^{2}}\right )}{g^{2} b \left (b x +a \right )}+\frac {4 A B a d}{g^{2} \left (a d -c b \right ) b \left (b x +a \right )}-\frac {4 A B c}{g^{2} \left (a d -c b \right ) \left (b x +a \right )}+\frac {4 A B \,d^{2} \ln \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right ) a}{g^{2} b \left (a d -c b \right )^{2}}-\frac {4 A B d \ln \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right ) c}{g^{2} \left (a d -c b \right )^{2}}\) | \(391\) |
derivativedivides | \(-\frac {\frac {A^{2}}{\left (b x +a \right ) g^{2}}+\frac {B^{2} \ln \left (\frac {e \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )^{2}}{b^{2}}\right )^{2}}{g^{2} \left (b x +a \right )}+\frac {8 B^{2}}{g^{2} \left (b x +a \right )}-\frac {4 B^{2} \ln \left (\frac {e \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )^{2}}{b^{2}}\right )}{g^{2} \left (b x +a \right )}+\frac {4 B^{2} d \ln \left (\frac {e \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )^{2}}{b^{2}}\right )}{g^{2} \left (a d -c b \right )}-\frac {B^{2} d \ln \left (\frac {e \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )^{2}}{b^{2}}\right )^{2}}{g^{2} \left (a d -c b \right )}+\frac {2 A B \ln \left (\frac {e \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )^{2}}{b^{2}}\right )}{g^{2} \left (b x +a \right )}-\frac {4 A B a d}{g^{2} \left (a d -c b \right ) \left (b x +a \right )}+\frac {4 A B b c}{g^{2} \left (a d -c b \right ) \left (b x +a \right )}-\frac {4 A B \,d^{2} \ln \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right ) a}{g^{2} \left (a d -c b \right )^{2}}+\frac {4 A B d \ln \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right ) b c}{g^{2} \left (a d -c b \right )^{2}}}{b}\) | \(431\) |
default | \(-\frac {\frac {A^{2}}{\left (b x +a \right ) g^{2}}+\frac {B^{2} \ln \left (\frac {e \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )^{2}}{b^{2}}\right )^{2}}{g^{2} \left (b x +a \right )}+\frac {8 B^{2}}{g^{2} \left (b x +a \right )}-\frac {4 B^{2} \ln \left (\frac {e \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )^{2}}{b^{2}}\right )}{g^{2} \left (b x +a \right )}+\frac {4 B^{2} d \ln \left (\frac {e \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )^{2}}{b^{2}}\right )}{g^{2} \left (a d -c b \right )}-\frac {B^{2} d \ln \left (\frac {e \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )^{2}}{b^{2}}\right )^{2}}{g^{2} \left (a d -c b \right )}+\frac {2 A B \ln \left (\frac {e \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )^{2}}{b^{2}}\right )}{g^{2} \left (b x +a \right )}-\frac {4 A B a d}{g^{2} \left (a d -c b \right ) \left (b x +a \right )}+\frac {4 A B b c}{g^{2} \left (a d -c b \right ) \left (b x +a \right )}-\frac {4 A B \,d^{2} \ln \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right ) a}{g^{2} \left (a d -c b \right )^{2}}+\frac {4 A B d \ln \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right ) b c}{g^{2} \left (a d -c b \right )^{2}}}{b}\) | \(431\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 582 vs.
\(2 (159) = 318\).
time = 0.33, size = 582, normalized size = 3.71 \begin {gather*} 4 \, {\left ({\left (\frac {1}{b^{2} g^{2} x + a b g^{2}} + \frac {d \log \left (b x + a\right )}{{\left (b^{2} c - a b d\right )} g^{2}} - \frac {d \log \left (d x + c\right )}{{\left (b^{2} c - a b d\right )} g^{2}}\right )} \log \left (\frac {d^{2} x^{2} e}{b^{2} x^{2} + 2 \, a b x + a^{2}} + \frac {2 \, c d x e}{b^{2} x^{2} + 2 \, a b x + a^{2}} + \frac {c^{2} e}{b^{2} x^{2} + 2 \, a b x + a^{2}}\right ) + \frac {{\left (b d x + a d\right )} \log \left (b x + a\right )^{2} + {\left (b d x + a d\right )} \log \left (d x + c\right )^{2} - 2 \, b c + 2 \, a d - 2 \, {\left (b d x + a d\right )} \log \left (b x + a\right ) + 2 \, {\left (b d x + a d - {\left (b d x + a d\right )} \log \left (b x + a\right )\right )} \log \left (d x + c\right )}{a b^{2} c g^{2} - a^{2} b d g^{2} + {\left (b^{3} c g^{2} - a b^{2} d g^{2}\right )} x}\right )} B^{2} - 2 \, A B {\left (\frac {\log \left (\frac {d^{2} x^{2} e}{b^{2} x^{2} + 2 \, a b x + a^{2}} + \frac {2 \, c d x e}{b^{2} x^{2} + 2 \, a b x + a^{2}} + \frac {c^{2} e}{b^{2} x^{2} + 2 \, a b x + a^{2}}\right )}{b^{2} g^{2} x + a b g^{2}} - \frac {2}{b^{2} g^{2} x + a b g^{2}} - \frac {2 \, d \log \left (b x + a\right )}{{\left (b^{2} c - a b d\right )} g^{2}} + \frac {2 \, d \log \left (d x + c\right )}{{\left (b^{2} c - a b d\right )} g^{2}}\right )} - \frac {B^{2} \log \left (\frac {d^{2} x^{2} e}{b^{2} x^{2} + 2 \, a b x + a^{2}} + \frac {2 \, c d x e}{b^{2} x^{2} + 2 \, a b x + a^{2}} + \frac {c^{2} e}{b^{2} x^{2} + 2 \, a b x + a^{2}}\right )^{2}}{b^{2} g^{2} x + a b g^{2}} - \frac {A^{2}}{b^{2} g^{2} x + a b g^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 196, normalized size = 1.25 \begin {gather*} -\frac {{\left (A^{2} - 4 \, A B + 8 \, B^{2}\right )} b c - {\left (A^{2} - 4 \, A B + 8 \, B^{2}\right )} a d + {\left (B^{2} b d x + B^{2} b c\right )} \log \left (\frac {{\left (d^{2} x^{2} + 2 \, c d x + c^{2}\right )} e}{b^{2} x^{2} + 2 \, a b x + a^{2}}\right )^{2} + 2 \, {\left ({\left (A B - 2 \, B^{2}\right )} b d x + {\left (A B - 2 \, B^{2}\right )} b c\right )} \log \left (\frac {{\left (d^{2} x^{2} + 2 \, c d x + c^{2}\right )} e}{b^{2} x^{2} + 2 \, a b x + a^{2}}\right )}{{\left (b^{3} c - a b^{2} d\right )} g^{2} x + {\left (a b^{2} c - a^{2} b d\right )} g^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 450 vs.
\(2 (134) = 268\).
time = 2.75, size = 450, normalized size = 2.87 \begin {gather*} \frac {4 B d \left (A - 2 B\right ) \log {\left (x + \frac {4 A B a d^{2} + 4 A B b c d - 8 B^{2} a d^{2} - 8 B^{2} b c d - \frac {4 B a^{2} d^{3} \left (A - 2 B\right )}{a d - b c} + \frac {8 B a b c d^{2} \left (A - 2 B\right )}{a d - b c} - \frac {4 B b^{2} c^{2} d \left (A - 2 B\right )}{a d - b c}}{8 A B b d^{2} - 16 B^{2} b d^{2}} \right )}}{b g^{2} \left (a d - b c\right )} - \frac {4 B d \left (A - 2 B\right ) \log {\left (x + \frac {4 A B a d^{2} + 4 A B b c d - 8 B^{2} a d^{2} - 8 B^{2} b c d + \frac {4 B a^{2} d^{3} \left (A - 2 B\right )}{a d - b c} - \frac {8 B a b c d^{2} \left (A - 2 B\right )}{a d - b c} + \frac {4 B b^{2} c^{2} d \left (A - 2 B\right )}{a d - b c}}{8 A B b d^{2} - 16 B^{2} b d^{2}} \right )}}{b g^{2} \left (a d - b c\right )} + \frac {\left (- 2 A B + 4 B^{2}\right ) \log {\left (\frac {e \left (c + d x\right )^{2}}{\left (a + b x\right )^{2}} \right )}}{a b g^{2} + b^{2} g^{2} x} + \frac {\left (B^{2} c + B^{2} d x\right ) \log {\left (\frac {e \left (c + d x\right )^{2}}{\left (a + b x\right )^{2}} \right )}^{2}}{a^{2} d g^{2} - a b c g^{2} + a b d g^{2} x - b^{2} c g^{2} x} + \frac {- A^{2} + 4 A B - 8 B^{2}}{a b g^{2} + b^{2} g^{2} x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 374 vs.
\(2 (159) = 318\).
time = 3.15, size = 374, normalized size = 2.38 \begin {gather*} -{\left (\frac {B^{2} d}{b^{2} c g^{2} - a b d g^{2}} + \frac {B^{2}}{{\left (b g x + a g\right )} b g}\right )} \log \left (\frac {\frac {b^{2} c^{2} g^{2}}{{\left (b g x + a g\right )}^{2}} - \frac {2 \, a b c d g^{2}}{{\left (b g x + a g\right )}^{2}} + \frac {a^{2} d^{2} g^{2}}{{\left (b g x + a g\right )}^{2}} + \frac {2 \, b c d g}{b g x + a g} - \frac {2 \, a d^{2} g}{b g x + a g} + d^{2}}{b^{2}}\right )^{2} - \frac {4 \, {\left (A B d - B^{2} d\right )} \log \left (\frac {b c g}{b g x + a g} - \frac {a d g}{b g x + a g} + d\right )}{b^{2} c g^{2} - a b d g^{2}} - \frac {2 \, {\left (A B - B^{2}\right )} \log \left (\frac {\frac {b^{2} c^{2} g^{2}}{{\left (b g x + a g\right )}^{2}} - \frac {2 \, a b c d g^{2}}{{\left (b g x + a g\right )}^{2}} + \frac {a^{2} d^{2} g^{2}}{{\left (b g x + a g\right )}^{2}} + \frac {2 \, b c d g}{b g x + a g} - \frac {2 \, a d^{2} g}{b g x + a g} + d^{2}}{b^{2}}\right )}{{\left (b g x + a g\right )} b g} - \frac {A^{2} - 2 \, A B + 5 \, B^{2}}{{\left (b g x + a g\right )} b g} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.49, size = 227, normalized size = 1.45 \begin {gather*} \frac {\ln \left (\frac {e\,{\left (c+d\,x\right )}^2}{{\left (a+b\,x\right )}^2}\right )\,\left (\frac {4\,B^2}{b^2\,d\,g^2}-\frac {2\,A\,B}{b^2\,d\,g^2}\right )}{\frac {x}{d}+\frac {a}{b\,d}}-\frac {A^2-4\,A\,B+8\,B^2}{x\,b^2\,g^2+a\,b\,g^2}-{\ln \left (\frac {e\,{\left (c+d\,x\right )}^2}{{\left (a+b\,x\right )}^2}\right )}^2\,\left (\frac {B^2}{b^2\,g^2\,\left (x+\frac {a}{b}\right )}-\frac {B^2\,d}{b\,g^2\,\left (a\,d-b\,c\right )}\right )+\frac {B\,d\,\mathrm {atan}\left (\frac {\left (2\,b\,d\,x+\frac {c\,b^2\,g^2+a\,d\,b\,g^2}{b\,g^2}\right )\,1{}\mathrm {i}}{a\,d-b\,c}\right )\,\left (A-2\,B\right )\,8{}\mathrm {i}}{b\,g^2\,\left (a\,d-b\,c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________